package com.gss.plugin.oauth2.resource;

import com.gss.entity.R;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author DYang
 * @date 2023/8/20
 */
@RestController
@RequestMapping("/user")
public class UserController {

    /**
     * 获取当前用户
     * @param authentication
     * @return
     */
    @GetMapping("/getUser")
    public R<Object> getUser(Authentication authentication){
        return R.ok(authentication);
    }

}
